<?php

namespace App\Http\Controllers;

use App\Traits\ResponseApi;
use Illuminate\Http\Request;

/**
 * 后台控制器基类
 * Class AdminBaseController
 * @package App\Http\Controllers
 */
class AdminBaseController extends Controller
{
    // 无需登录的方法
    protected $noNeedLogin = [];

    // 无需鉴权的方法
    protected $noNeedRight = [];

    public function __construct()
    {
        $this->middleware(['auth:admin', 'jwt.role:admin'], ['except' => $this->noNeedLogin]);
        $this->middleware(['check.permission'], ['except' => $this->noNeedRight]);
    }

    use ResponseApi;
}
